package com.fh.Enum;

import java.util.HashMap;
import java.util.Map;

public enum EnUserStatus {
	OFF("0","关闭"),
	ON("1","开启");
	
	private String index;
	private String name;
	
	public static final Map<String, String> userStatus = new HashMap<String, String>();
	
	static{
		for (EnUserStatus e : EnUserStatus.values()) {
			userStatus.put(e.index, e.name);
		}
	}
	
	EnUserStatus(String index,String name){
		this.index = index;
		this.name = name;
	}
	
	public static String getName(String index){
		for (EnUserStatus e : EnUserStatus.values()) {
			if(e.index == index){
				return e.name;
			}
		}
		return null;
	}
}
